//
//  BaseViewController.h
//  MyFunctionDemo
//
//  Created by Ting Han on 2017/9/21.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BaseViewControllerConfig.h"
#import "ShowLoadingView.h"

@class BaseViewController;

@protocol BaseViewControllerDelegate <NSObject>

@optional
- (void)baseViewController:(__kindof BaseViewController *)controller event:(id)event;

@end

extern NSString * const windowAreaViewId;
extern NSString * const loadingAreaViewId;
extern NSString * const titleViewId;
extern NSString * const contentViewId;
extern NSString * const backgroundViewId;

@interface BaseViewController : UIViewController

@property (nonatomic,weak) id<BaseViewControllerDelegate>baseViewControllerDelegate;
/*
  当当前ViewController是navigationController的RootViewController时调用,RootViewController持有这个代理，手势滑动代理
 */
- (void)useInteractivePopGestureRecognizer;
//是否手势返回是否可用
@property (nonatomic)  BOOL  enableInteractivePopGestureRecognizer;

#pragma mark --- 被继承使用
@property (nonatomic, strong) ShowLoadingView  *windowAreaView;
@property (nonatomic, strong) ShowLoadingView  *loadingAreaView;
@property (nonatomic, strong) UIView           *titleView;
@property (nonatomic, strong) UIView           *contentView;
@property (nonatomic, strong) UIView           *backgroundView;


- (void)makeViewsConfig:(NSMutableDictionary <NSString *, BaseViewControllerConfig *> *)viewsConfig;

- (void)setupDataSource;

- (void)setupSubViews;

@end
